package demo3;

import java.util.Objects;

public class Person {

    public String id;

    public Person(String id) {
        this.id = id;
    }

    public boolean equals(Object obj) {
        Person tmp = (Person)obj;

        return tmp.id.equals(this.id);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                '}';
    }
}
